package com.contextor.cards.shell.core
{
	public class Enum extends Object
	{
		public var data:*;
		public var label:String;
		
		protected static var ENUM_NOT_FOUND:String = "Not Found";
		
		public function Enum(_data:*, _label:String)
		{
			super();
			
			this.data = _data;
			this.label = _label;
		}
		
		public static function getLabel(list:Array, data:*):String
		{
			for(var i:int = 0;i<list.length;i++)
			{
				if(Enum(list[i]).data == data) return Enum(list[i]).label; 
			}
			
			return ENUM_NOT_FOUND;
		}
	}
}